<fieldset id="service-follow" {% if wechatNotificationSetting.notification_type == 'messageSubscribe' and wechatSetting.wechat_notification_enabled == 1 %}style="display:none;"{% endif %}>
  <legend>{{'admin.wechat_notification.template'|trans}}</legend>
  <table class="table table-striped table-hover">
    <thead>
    <tr>
      <th width="20%">{{ 'admin.wechat_notification.template_name'|trans }}</th>
      <th width="50%">{{ 'admin.wechat_notification.template_content_sample'|trans }}</th>
      <th width="15%">{{ 'admin.wechat_notification.send_object'|trans }}</th>
      <th width="10%">{{ 'admin.wechat_notification.template_status'|trans }}</th>
      <th width="5%">{{ 'admin.wechat_notification.operation'|trans }}</th>
    </tr>
    </thead>
    <tbody>
    {% for key,template in templates %}
      <tr>
        <td width="20%">{{ template.name|trans|raw }}</td>
        <td width="50%"><a class="alert-link" href="#modal" data-toggle="modal" data-url="{{ path('admin_v2_wechat_notification_show', {key: key}) }}">{{ template.content|trans|sub_text(30)|raw }}</td>
        <td width="15%">{{ template.object }}</td>
        <td width="10%">
          {% if template.status == 1 %}
            <span class="text-success">{{ 'wechat.notification.template_opend'|trans }}</span>
          {% else %}
            <span>{{ 'wechat.notification.template_closed'|trans }}</span>
          {% endif %}
        </td>
        <td width="5%">
          <a class="js-wechat-notification-setting alert-link" {% if isCloudOpen and wechatSetting.wechat_notification_enabled %} href="#modal" data-toggle="modal" data-url="{{ path('admin_v2_wechat_notification_setting_modal', {key: key,notificationType: 'serviceFollow'})}}"{% else %}href="javascript:;" {% endif %}>
            {{ 'admin.wechat_notification.template_setting'|trans }}
          </a>
        </td>
      </tr>
    {% endfor %}
    </tbody>
  </table>
</fieldset>